 <header id="header">
      <nav class="navbar navbar-inverse navbar-fixed-top">
        <!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
        <div class="container">
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#md-list" aria-expanded="false">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>

            </button>
            <a class="navbar-brand" href="/heart"><span class="glyphicon glyphicon-heart"></span> 心愿墙</a>
          </div>

          <div class="collapse navbar-collapse" id="md-list">
            <ul class="nav navbar-nav">
              <li <%if(active=="首页"){%>class="active"<%}%>">
                <a href="/heart">首页</a>
              </li>
               <%if(login){%>
              <li <%if(active=="我的心愿"){%>class="active"<%}%>>
                <a href="/user/<%=username%>">我的心愿</a>
              </li>
              <%}%>
              <li <%if(active=="成员列表"){%>class="active"<%}%>>
                <a href="/userlist">成员列表</a>
              </li>


            </ul>


             <%if(login){%>
            <ul class="nav navbar-nav navbar-right hidden-sm">
            <li><a href="">欢迎您！<%=username%></a></li>
            <li><a style="padding: 5px; display:block;" href="/setavatar"><div style="border-radius: 20px; overflow: hidden;"><img width="40" height="40" src="/avatar/<%=avatar%>" alt=""></div></a><li>
            </ul>

           <% }else{%>

            <form class="navbar-form navbar-right">

            <a href="/heart" class="btn btn-success">登录</a>
            <a href="/regist" class="btn btn-default">注册</a>
          </form>
           <%}%>

          </div>
          <!-- /.navbar-collapse --> </div>
      </nav>
    </header>